package com.imay.live.activity.family;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.View;

import com.imay.live.R;
import com.imay.live.activity.BaseRequestActivity;
import com.imay.live.activity.family.controller.FamilyLevelController;
import com.imay.live.manager.FamilyAccountManager;
import com.imay.live.model.FamilyModel;
import com.imay.live.model.FamilyUserInfo;

/**
 * Created by Administrator on 2017/9/13 0013.
 */

public class FamilyLevelActivity extends BaseRequestActivity {

    private static final String KEY_FAMILY = "key_family";

    private FamilyLevelController controller;
    private FamilyModel family;

    /**
     * @param context
     */
    public static void startActivity(Context context, FamilyModel family) {
        Intent intent = new Intent(context, FamilyLevelActivity.class);
        intent.putExtra(KEY_FAMILY, family);
        context.startActivity(intent);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_family_level;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        family = (FamilyModel) getIntent().getSerializableExtra(KEY_FAMILY);
        setTitle(R.string.str_family_level_title);
        controller = (FamilyLevelController) FamilyLevelController.Builder.create(this, FamilyLevelController.class).build();
        controller.setFamilyData(family);
    }
}
